/**
 * @copyright   2010-2017, The Titon Project
 * @license     http://opensource.org/licenses/BSD-3-Clause
 * @link        http://titon.io
 */

@include export("pagination") {
    $titon-pagination-class-item: generate-class-name($titon-pagination, "item");

    #{generate-class-name($titon-pagination)} {
        display: inline-block;

        ol {
            @extend %placeholder-list;
            display: flex;
        }
    }

    #{$titon-pagination-class-item},
    #{generate-class-name($titon-pagination, "spacer")} {
        position: relative;
        display: inline-block;
        padding: theme-setting("medium-padding");
    }

    //-------------------- Modifiers --------------------//

    @if (is-feature-enabled("all-modifiers") or index(map-get($titon-pagination, "modifiers"), "grouped")) {
        #{generate-class-name($titon-pagination, "", "grouped")} {
            #{$titon-pagination-class-item} {
                flex-grow: 1;
                z-index: 0;

                &:hover,
                &.is-active {
                    z-index: 1;
                }
            }
        }
    }
}
